Method of controlling a permanent magnent synchronous motor and a motor circuit

ABSTRACT

A method of controlling a motor, for example of an electric power steering system, includes receiving a motor torque demand signal indicative of a torque required from the motor. A current demand signal indicative of the currents to be applied to each phase to meet the torque demand is generated from the motor torque demand signal. One or more operational values from the motor are determined. The current demand signal is set as a function of one or more parameters of the motor obtained by fitting a flux linkage model to the measured operational values. A motor circuit having the permanent magnet electric motor includes a control stage arranged to generate the current demand signal in response to a torque demanded of the motor. A modifying means modifies the magnitude and/or the phase of the current demanded for each phase of the motor by the controller.

RELATED APPLICATION

This application claims priority from British Application No. 1819999.2, filed Dec. 7, 2018, the subject matter of which is incorporated herein by reference in its entirety.

BACKGROUND OF THE INVENTION

This invention relates to a method of controlling a permanent magnet synchronous motor and to a motor circuit including such a motor.

Permanent magnet synchronous motors are well known for use in a wide range of applications. They have proven especially suitable for use in electric power steering systems due to their ability to operate precisely over a wide range of torques as well as being robust and cost effective. In an electric power steering system the motor is driven in response to a torque demand signal to apply a torque to a steering shaft or other part of the steering mechanism that helps the driver to turn the wheel. In a fully steer by wire system, the motor may be the sole means of turning the steered wheels of the vehicle, but generally it will apply a torque alongside a driver applied torque.

In an electric power steering system the motor will be required to operate over a very wide range of speeds including down to zero speed. An inverter is used to create a multi-phase variable frequency AC current from the DC battery on board the vehicle. The rotor of a permanent magnet synchronous motor rotates in synchronism with the electrical supply. By varying the frequency of the AC current supplied to the motor, the motor speed can be varied. For a permanent magnet synchronous motor with surface mounted magnets, at low speeds, the assistance torque available is proportional to the magnitude of the phase current supplied to the motor. At higher speeds the current supplied by the inverter is advanced in phase with respect to the back-emf of the motor. This allows the motor to still provide torque at higher speeds, albeit at a reduced level. The inverter includes a set of switching elements that can be opened and closed to connect each phase to a positive battery supply or to ground. Rapidly opening and closing the switches in a defined pattern enables the AC waveforms to be applied to each phase from the DC battery supply. A typical inverter bridge employed in an EPS system comprises a plurality of silicon metal oxide (MOSFET) semiconductor switching elements which control the current delivered to the motor and thus the rotation of the motor. Control algorithms determining the sequence and timing of the on states of the MOSFET switches are executed in real time using a microcontroller. The microcontroller reads a plurality of sensor signals providing such as measures of the motor phase current or the rotor position to inform these algorithms.

A typical closed loop electric motor circuit 1 is shown in FIG. 1. This includes a current controller 2 that uses vector control in response to a requested target current or to generate a current demand signal which is in turn used to generate a voltage waveform that is applied to each phase winding of the motor 4 by the inverter 3. The resultant generated phase currents are measured and then fed back into the current controller 2, typically a PI controller, to control the requested phase voltages to achieve the target current. In an arrangement where it is important to control the torque of the motor, such as when used to apply an assistance torque in a power steering system, the target current will be derived from a torque demand signal fed into the current controller from a torque controller 5.

In order to provide the required feedback a means 6 for measuring the current in each phase is needed, and for correct generation of the voltage waveforms the position of the rotor is also required. This may be measured or a form of position Sensorless control may be used to estimate the position of the rotor.

In some cases, the torque may be measured rather than the currents, and this may be feedback to the PI controller 2 which receives the torque demand signal from the torque controller 5 as an input, the torque demand and measured torque being compared to produce a torque error signal which is driven to zero by the PI controller. This is generally not practical because of the need for a dedicated torque sensor that gives an accurate measurement of motor torque.

In the case of the use of a motor in an application such as a power steering system, the motor will in use be subject to a wide range of temperatures. The motor may be located in an uninsulated space under the bonnet of the vehicle. The applicant has appreciated that many of the motor parameters are temperature dependent and that the performance of the motor and motor control method used will in turn be dependent on variations in temperature.

SUMMARY OF THE INVENTION

An object of the present invention is to provide a method of controlling a motor that ameliorates at least some of the effects of temperature in some cases, or otherwise improves on the performance of prior motor control methods.

According to a first aspect the invention provides a method of controlling a motor, for example of an electric power steering system, comprising the steps of:

-   -   Receiving a motor torque demand signal indicative of a torque         required from the motor;     -   Generating from the motor torque demand signal a current demand         signal indicative of the currents to be applied to each phase to         meet the torque demand, and further comprising     -   determining one or more operational values from the motor, and     -   Setting the current demand signal as a function of one or more         parameters of the motor obtained by fitting a flux linkage model         to the measured operational values.

By setting the current demand signal based on one or more parameters obtained by fitting the flux linkage model to real operational data obtained when the motor is in use, the performance of the motor can be beneficially set and in various implementations of the method optimised or otherwise improved to suit the observed motor parameters.

The method may comprise modifying a current demand signal dependent on the values of the one or more parameters.

The modification may be implemented in a number of ways. For instance a current demand signal may be generated and this may be modified to produce a modified current demand signal that is then fed through to a motor drive stage. Alternatively the step of setting the current demand signals may be dependent directly on the one or more parameters, so that the value of current demand is not as such modified but is made dependent on that one or more parameter.

The step of determining the one or more operational parameters may comprise measuring the parameter or parameters or estimating them using a sensorless measurement technique.

In a first preferred arrangement of the method, known hereafter as adaptive phase advance, the method the step of modifying the performance of the motor may comprise maximising the electromagnetic torque produced by the motor at the commanded operating speed subject to operating constraints. These constraints may include the maximum phase current and available supply voltage.

Typically the phase advance applicable at any speed is determined in a laboratory and programmed in to the controller. This might be done at only one temperature. In the method of the invention, this phase advance may be varied in use of the motor as the current demands are modified dependent on the value of the parameters obtained using the model.

Through computing the optimal phase advance online using the model, rather than using fixed predetermined phase advance values, the capability of the motor under the actual operating conditions can be maximised. Alternatively costly and lengthy procedures to identify the optimal phase advance at a range of operating temperatures can be avoided.

The method may determine from use of the flux linkage model the maximum torque per ampere (below based speed) and the maximum torque per volt (above base speed) are obtained. Below base speed the only constraint is the maximum phase current which is limited by the hardware design. In this case, below based speed, the torque equation (1) is used to find a set of dq-currents that produces maximum torque at a certain phase current. Conversely the optimal set of dq-currents, that produces a given torque, is determined. The target is to obtain the maximum possible torque with minimum possible phase current magnitude or current vector length. The solution to this problem is known in the literature as the MTPA-curve or maximum torque per ampere curve. T _(e)(i _(d) ,i _(q))=3/2p(ψ_(d)(i _(d) ,i _(q))i _(q)−ψ_(q)(i _(d) ,i _(q))i _(d))  (1)

By introducing the saturation and the cross-coupling terms in to the flux equations the accuracy of the maximum torque at optimal dq-currents increases compared to the linear model.

Above base speed, the DC-link voltage enters as an additional constraint. The maximum torque is then determined with respect the maximum available voltage and the maximum phase current at any speed above base speed, conversely the optimal set of dq-currents, that produces a given torque at a certain DC-link voltage and maximum phase current is determined. The demanded torque shall be then produced with the minimum possible phase current magnitude or current vector length.

The set of dq-currents or the set of phase current and phase advance angle are then passed to the dq-current controllers.

In a second preferred arrangement of the method, which may be implemented alone or combined with the first refinement or any other method step described herein, known as torque estimation, the method may fit the values to a flux linkage model that includes terms representing the variation in permanent magnet flux linkage with the magnet temperature.

The method may be as defined in Equation (1) noted above.

The method may further comprise calculating the electromagnetic torque to be given the d- and q-axis flux linkages and d- and q-axis currents supplied to the motor during use of the motor. Through utilising a flux linkage model that includes the magnet flux variation, magnetic saturation and cross-coupling effects between the d- and q-axes an accurate online estimate of the motor torque can be obtained.

The method may comprise comparing the estimated torque with the demanded torque indicated by the torque demand signal to derive an error term indicative of the difference in the torques and input the error term to the controller. The controller may generate a current demand signal from the error term.

Alternatively or additionally the method may comprise using the computed torque value for monitoring and diagnostic functions to evaluate the health of the motor or the electronics.

In a third advantageous arrangement of the method, known as magnet temperature estimation, the method may comprise use of the flux linkage model to identify the operating temperature of the permanent magnets within the motor during use of the motor or when the motor is offline. In a particularly advantageous arrangement, the parameters of the flux linkage model that are relatively insensitive to temperature may be established off-line, for instance in a laboratory. At a later time the method may measure the operational values of the motor during use of the motor and from those establish one or more parameters of the flux linkage model, the method comparing the offline and online parameters to identify how much the magnet flux has varied from the off-line value.

The method may comprise determining the temperature of the magnets within the motor or determining the temperature rise or fall of the motor relative to the temperature at which the offline parameters were determined by processing the variation in the magnet flux with the temperature coefficient of the magnets the temperature.

The method may comprise employing the temperature rise of fall to actively de-rate the system, for example through reducing the magnitude of current supplied to the motor, the amount of d-axis current supplied to the motor, or limiting the motor speed to ensure that the magnet does not suffer permanent demagnetisation. Those skilled in the art will appreciate that direct measurement of rotor temperature is not straightforward, and that the approach of estimating the magnet temperature on the rotor using the model provides information that would otherwise be difficult or costly to obtain.

In a fourth arrangement of the method, the method may determine from the flux linkage model the winding temperature or rise or fall in temperature of the windings of the motor. This may be achieved using the method by identifying any variation in winding temperature from those found at a known temperature. By having an accurate estimate of the winding temperature the capability of the motor can be fully utilised and not de-rated unnecessarily. Damage to the windings through excessive internal resistive losses can also be prevented. Estimating the winding temperature through use of the model removes the need to include additional thermistors, related analogue processing electronics, connections and fine wires from the windings.

In a fifth implementation of the method, the method may include combining the flux linkage model of the motor with a model for estimating the temperature in one or more parts of the motor and control electronics.

This provides for further accuracy of the motor parameters estimated online. Additionally a temperature sensor may be included within the control electronics, and used as an additional input to the combined on-line flux linkage and thermal model.

In a sixth arrangement of the method, the method may determine the winding resistance from use of the model and may compare the winding resistance determined during use of the motor with a predefined nominal winding resistance to perform phase resistance diagnostics where any major or unexpected change in the winding resistance would be observed by monitoring the estimated value of the stator winding resistance or interconnects between the motor and the control electronics.

The nominal winding resistance may be obtained by measurement of the resistance during assembly or end of line testing of the motor,

The invention determines one or more parameters of the motor by fitting a flux linkage model of the motor to operational values obtained, as the motor is in use, and in turn uses these to modify the motor performance. This is achieved in particular through use of a novel motor model developed by the applicant.

The method may modify the magnitude and/or the phase advance in order to maximise the torque available from the motor.

The step of modifying the magnitude and the phase of the current may comprise advancing the phase of the current for one or more of the phases in order to maximise the efficiency of the motor or of a drive circuit for the motor.

The step of generating the current magnitude and phase for each phase of the motor may comprise an intermediate step of generating a current demand signal in the dq reference frame, and subsequently converting the dq current demand signal into a set of currents demanded for each phase.

The step of generating the current demand signal may comprise generating an error signal dependent on the difference between the torque demand signal and an estimate of the actual motor torque obtained by fitting the measured operational values to the model. The method may feed the torque error signal to the controller which drives the error to zero.

The method may comprise determining the motor torque by fitting the model to the measured operational values.

The method may use a flux linkage model that includes the effects of saturation for the fitting of the values.

In particular, the method may use a flux linkage model that includes the effects of cross-coupling between d- and q-axes instead of, or in addition to, the effects of saturation. Prior art models generally are linear models that do not allow for these effects, making them unsuitable for applications were accurate determination of the parameters is required.

In a particularly advantageous arrangement the flux linkage model utilises a power series based upon Taylor's theorem for multivariable functions. This enables the power series to be valid for all infinite differentiable functions.

In one arrangement, the method may comprise comparing the parameters obtained from the model with prior determined values for those parameters corresponding to the motor when at a known temperature, and from the comparison estimating the temperature of the motor.

The prior determined values may be generated by a finite element model or offline measurement of operational values of the motor such as the rotor position, phase currents, phase terminal voltage, flux linkage values and motor torque or by a combination of finite element and offline measurements of operational values of the motor.

The method may comprise modifying the performance of the motor by varying the magnitude and or the phase advance of the phase currents as a function of temperature.

The method may obtain the parameters by performing the following steps:

-   -   Obtaining a plurality of winding flux linkage values or terminal         voltages of the motor, each corresponding to a different         combination of phase current magnitude and phase advance,     -   Transforming the resultant flux-linkage values or terminal         voltages into the rotor dq reference frame,     -   Fitting the flux linkage model to the one or more dq-axis         flux-linkage values or terminal voltages and their linked phase         current magnitude and phase advance using a process of         parametric optimisation.

The method may use a flux linkage model that includes the effects of saturation for the fitting of the values.

In particular, the method may use a flux linkage model that includes the effects of cross-coupling between d- and q-axes instead of, or in addition to, the effects of saturation. Prior art models general are linear models that do not allow for these effects, making them unsuitable for applications were accurate determination of the parameters is required.

In a particularly advantageous arrangement the flux linkage model utilises a power series based upon Taylor's theorem for multivariable functions. This enables the power series to be valid for all infinite differentiable functions.

The step of obtaining the plurality of winding flux linkage values may comprise obtaining the values through a finite element simulation of the motor. This may be useful for establishing nominal parameters during end of line testing of the motor, which as described above could be compared with parameters obtained online to identify the temperature of parts of the motor or to identify changes in winding resistance.

An electromagnetic finite element simulation of a three phase motor may directly provide the fluxes in the three phases and the invention may then transform these into the dq-frame.

The step of fitting the model to the linked values may comprise a step of using the transformed values to generate at least one map for the d-axis and q-axis flux-linkages, each map grouping together flux linkage values or terminal voltages having a common phase advance, and

Fitting the flux linkage model to the one or more dq-axis flux-linkage maps using a process of parametric optimisation.

The step of fitting the model to the flux linkage values or terminal voltages may comprise a step of forming one or more 2D or 3D maps using the flux linkage values or terminal voltages where each map corresponds to a different phase advance or phase current, the model being parameters being selected to give the best fit of the model to each map.

At least one map may comprise a plot of the dq-fluxes against the dq-current.

In an alternative the map may comprise a plot of the dq-fluxes as a function of both the phase advance and the current magnitude

These maps may be used by the method of the invention for the parameter identification.

In an alternative the method may use the dq-voltages as the basis for the maps as these voltages are known to be a function of the flux-linkages:

$\begin{matrix} {u_{d} = {{I_{d}R_{s}} - {w_{r}\psi_{q}} + \frac{d\;\psi_{d}}{dt}}} & (2) \\ {u_{q} = {{I_{q}R_{s}} + {w_{r}\psi_{d}} + \frac{d\;\psi_{q}}{dt}}} & (3) \end{matrix}$

The step of fitting of the model to the map or maps may comprise a quadratic parameterisation process whereby the parameters of the flux-model are determined using a gradient based method to minimize the sum of the square of the squared errors.

The method may fit the coefficients of a power series that represents the d-axis and q-axis flux linkages to the d-axis and q-axis flux-linkage maps. The method may comprise selecting a power of the series according to the required accuracy which must be traded against the number of computations required to determine the parameters. A higher power will provide a higher accuracy but at greater computational cost.

The method may optimise the parameters of a model that comprises two equations for d-axis and q-axis flux linkages respectively of the form:

$\begin{matrix} {{\psi_{d}\left( {i_{d},i_{q}} \right)} = {\sum\limits_{m = 0}^{P}{\sum\limits_{i = 0}^{n - {2m}}{l_{{{dq}{(i)}}{({2m})}}i_{d}^{i}i_{q}^{({2m})}}}}} & (4) \end{matrix}$

Where

${\psi_{d}\left( {i_{d},i_{q}} \right)} = {\sum\limits_{m = 0}^{P}{\sum\limits_{i = 0}^{n - {2m}}{l_{{{dq}{(i)}}{({2m})}}i_{d}^{i}i_{q}^{({2m})}}}}$

And

$\begin{matrix} {{\psi_{q}\left( {i_{d},i_{q}} \right)} = {\sum\limits_{m = 0}^{P}{\sum\limits_{i = 0}^{n - {({{2m} + 1})}}{l_{{qd}{({{2m} + 1})}}i_{q}^{({{2m} + 1})}i_{d}^{i}}}}} & (5) \end{matrix}$

where,

$P = \left. \frac{\left( {n - 1} \right) - {{mod}\left( {\left( {n - 1} \right),2} \right)}}{2} \middle| {n \in N^{+}} \right.$

Where n is the model order, l_(dq) ₀₀ is the permanent flux-linkage (ψ_(m)), l_(dq) ₁₀ and l_(qd) ₁₀ are the linear dq-inductances used in the classical dq model and the remaining coefficients correspond to the saturation and cross-coupling terms.

In this step, the method may therefore optimise the model coefficients to determine values for the following parameters of the motor:

-   -   magnetic permanent flux-linkage ψ_(m)     -   cross coupling between d-axis and q-axis fluxes; and     -   dq-inductances.

The plurality of flux linkage values may be obtained by the method by measurement of the flux linkage values directly, by measuring operational parameters from which the flux linkage values can be calculated or which are known to be a function of the flux linkage values, or by finite element modelling of the motor. The method may use a combination of these three alternatives.

Where FE modelling is used the step of obtaining a plurality of winding flux linkage values may comprise obtaining operational values from which the flux linkage values can be derived, the operational values including one or more of the following:

-   -   The motor phase currents, meaning the current flowing in each         phase of the motor;         -   The rotor angular position; and         -   The flux-linkage in each phase of the motor.

Computer software using finite element methods is readily available to solve Maxwell's equations. Those skilled in the use of such software define the mechanical geometry of the motor being analysed, assign appropriate magnetic permeability to the materials using values taken from data sheets or measurement, assign the remenance and demagnetisation characteristic to any permanent magnet materials present in the motor again using values taken from data sheet or measurement, define the electrical conductivity of any materials, and define the number of turns and location of windings present within the motor. These finite element models can be in either two or three dimensions. Three dimensional problems take longer to solve, but yield more accurate results as end effects are accounted for. Depending upon the software being used, the rotor can be set to rotate whilst the currents within the windings are varied, or the currents varied whilst the rotor is held in place. The former allows time transient simulations to be utilised that include the effects of eddy currents within electrically conductive materials within the motor. If the effects of eddy currents are known to be low, magnetostatic simulations can be used. In either case, the simulation needs to be conducted for a range of winding currents at different phasing to the back-emf of the motor and at various current amplitudes. The flux linkage is calculated as a post-processing step from the magnetic field solution. Usually the flux linkage values are calculated for each winding, and therefore represent phase quantities. These flux linkage values, along with the phase currents used in the simulation are transformed in to the dq axes using the following equation:

$\begin{matrix} {\begin{bmatrix} S_{d} \\ S_{q} \end{bmatrix} = {\frac{2}{3}\left\lbrack \begin{matrix} {\cos(\theta)} & {\cos\left( {\theta - 120^{{^\circ}}} \right)} & {\cos\left( {\theta + 120} \right.} \\ {- {\sin(\theta)}} & {- {\sin\left( {\theta - 120^{{^\circ}}} \right)}} & {- {\sin\left( {\theta + 120} \right.}} \end{matrix} \right.}} & (6) \end{matrix}$

Where θ represents the electrical angle between the rotor direct axis and the stator phase-a axis. The letter S represents the quantity to be transformed, such as flux-linkages, phase currents or phase voltages.

It should be noted that whilst finite element analysis provides a ready approach to obtaining the flux linkages, other more traditional approaches using magnetic equivalent circuits could be utilised. Although quicker to compute their accuracy is far lower than the finite element method.

The method may involve finite element simulations at rotor mechanical positions corresponding to every 10 degrees electrically. The choice of the number of simulations being dependent upon accuracy and time available. To characterise a motor over a wide operating range, those skilled in the art appreciate the need to repeat the simulations for a range of phase current amplitudes.

Having obtained the d- and q-axis currents, rotor position, and corresponding flux linkages the flux model coefficients may be optimized using the quadratic parameterisation to fit the flux linkage curves obtained from the operational values.

In one implementation of the method, the objective function for the optimization may be the sum of the squared errors of the dq-axes flux linkages.

Where the operational values are modelled by finite element analysis, rather than real measured values, the optimisation of the model parameters may be performed individually using the following functions where the letters with a hat notation represent estimated values and the letters with no hat notation are the finite element values of the simulation.

$\begin{matrix} {{f_{d}\left( x_{d} \right)} = {\sum\limits_{k = 1}^{N}\left( {{\psi_{d}\left( {i_{d_{k}},i_{q_{k}}} \right)} - {\psi_{d}}} \right)^{2}}} & (7) \\ {{f_{q}\left( x_{q} \right)} = {\sum\limits_{k = 1}^{N}\left( {{\psi_{q}\left( {i_{d_{k}},i_{q_{k}}} \right)} - {\psi_{q}}} \right)^{2}}} & (8) \end{matrix}$

The identification of the model parameters that gives minimal least squares error may be implemented using a quadratic parameter modeller within an off the shelf computer program such as MATLAB.

This model may be used to determine the nominal parameter values with the motor offline, such as during end of line testing, based on actual measurements rather than FE analysis.

In a method where actual measurements are made rather than FE modelling the step of obtaining a plurality of winding flux linkage values may comprise obtaining operational values from which the flux linkage values can be derived, the operational values including one or more of the following:

-   -   The motor phase voltages, meaning the voltage applied to each         phase of the motor;     -   The motor phase currents, meaning the current flowing in each         phase of the motor;     -   The rotor angular position.

The method may comprise processing the one or more measurements to derive flux linkage values to which the model can be fitted. These can be grouped together in sets, each set corresponding to a respective phase current and phase advance.

Where possible the measurements may include direct measurement of the flux-linkage in each phase of the motor. This may be obtained from a search coil associated with each phase that is sensitive to the flux linkage.

Further operational values that may be obtained by the method that uses measured data may include one or more of the following:

-   -   The motor phase voltages, meaning the voltage applied to each         phase of the motor;

The motor phase currents, meaning the current flowing in each phase of the motor;

-   -   The rotor angular position; and     -   The motor torque.

Each of the obtained operational values may comprise real measured values, for instance obtained with the motor in use or in a laboratory.

In one implementation, referred to hereinafter as an offline method, the method may comprise collecting at least some of the operational values, or directly measuring the flux linkage, when the motor is offline, for example in a laboratory setting by applying a set of current ramps to the motor, with each ramp generating one of the set of operational values or flux linkage values and each ramp corresponding to a different phase advance angle of the motor currents.

For example, a current ramp may be applied at two, or three or four or more phase advance angles, e/g 0 degrees, 22.5 degrees, 45 degrees, and 70 degrees. Measurements may be taken periodically within the ramp to build up a set of operational parameters and/or flux linkage measurements at differing current values in each ramp. Each set may be used to generate a respective map that may be used during the model fitting process.

The offline method may comprise driving the motor with ramped currents of short duration. As the current is varied the rotor may be rotating under the control of an external drive, such as that contained within a dynamometer. The speed selected for the test may be below the base speed of the machine. Selection of the duration of the current ramps is influenced by the size of the machine, and the control system maintaining the rotor speed. For example, for a motor of around 1 hp rating, a current setting of 3 or 4 seconds may be appropriate. Keeping the ramps short ensures the duration of the whole measurement method is kept short which is advantageous as it is known that some of the motor parameters are temperature dependent. If the method takes too long the temperature of parts of the motor may have changed making the results inaccurate.

Once all samples have been taken, the method may process them all together to fit to the model, or may use them to form maps as explained above which can be fitted to the model.

The parameter identification using measured data may be based on measurements of the rotor reference frame voltages (dq-voltages) of the machine. To find the optimal coefficients, the sum of the squared errors of the normalized dq-voltages and normalized electric torque are minimized.

Consequently the equation below may be used in place of equations (7) and (8) in the numerical optimization to find the optimal set of parameters describing the motor. As with the optimization using simulated data, the identification of the model parameters that gives minimises the objective function may be implemented using a quadratic parameter modeller within an off the shelf computer program such as MATLAB.

$\begin{matrix} {{f(x)} = {\sum\limits_{k = 1}^{N}\left( {\left( {u_{d_{k}} -} \right)^{2} + \left( {u_{q_{k}} -} \right)^{2} + \left( {T_{e_{k}} -} \right.} \right.}} & (9) \end{matrix}$

Where the letters with a hat notation represent the values of the estimated values and the letters with no hat notation the measured values. The estimated values for voltage and torque are obtained using the following equations:

$\begin{matrix} {{T_{e}\left( {i_{d},i_{q}} \right)} = {\frac{3}{2}{p\left( {{{\psi_{d}\left( {i_{d},i_{q}} \right)}i_{q}} - {{\psi_{q}\left( {i_{d},i_{q}} \right)}i_{d}}} \right)}}} & (10) \\ {u_{d} = {{i_{d}R_{s}} - {w_{r}{\psi_{q}\left( {i_{d},i_{q}} \right)}} + \frac{d\;{\psi_{d}\left( {i_{d},i_{q}} \right)}}{dt}}} & (11) \\ {u_{q} = {{i_{q}R_{s}} + {w_{r}{\psi_{d}\left( {i_{d},i_{q}} \right)}} + \frac{d\;{\psi_{q}\left( {i_{d},i_{q}} \right)}}{dt}}} & (12) \end{matrix}$ p is the number of pole pairs within the motor w_(r) is the electrical frequency of the rotor in radians per second i_(d) and i_(q) are the d- and q-axis currents computed from the motor phase currents based on Clarke & Park transforms t is time in seconds R_(s) is the stator phase winding resistance T_(e) is the electromagnetic torque produced by the motor. It is assumed that the mechanical energy lost within the motor is negligible or is otherwise accounted for between where the torque is measured and produced within the air gap of the motor. ud and uq are the d- and q-axis voltages in the rotor reference frame

Where ψ_(q)(i_(d), i_(q)) and ψ_(d)(i_(d), i_(q)) are the flux-model power series equations (4) and (5). Because a flux-linkage measurement on the real motor is quite complicated we opted for the measurement of the dq-voltages as they depend on the dq-fluxes. In order to improve the accuracy of the parameter estimation the applicants found it beneficial to include the torque in the objective function.

In another alternative implementation, rather than Finite element modelling or obtaining operational values when the motor is offline the method may comprise measuring the plurality of motor operational values during use of the motor, in an online operation.

For a practical online operation, the method may obtain measurements of operational values over time. The range of these measured operational values is to a large extent dependent upon what the motor is being called to do in the working application. As a minimum, for each optimization the number of measurements of operational values that needs to be obtained is the same as the number of unknown parameters within the objective function. So for example for a model of order n=3, the following equations apply having 11 unknown parameters, which would therefore require 6 or more measurements each taken at a different operating point i.e. a different rotor positions, phase current magnitude or phasing of the electrical currents with respect to the rotor position.

Therefore depending on the number of unknown parameters in the model the method may comprise collecting a minimum of measurements of operational values that meet certain conditions to run the optimization. It is not only about the number of the measurements, the measurements need to be representative, for example a minimum current value or that the measurements cover different operational points.

For example, for an online estimation, the voltage equations in steady state for model order n=3 would take the following form:

$\begin{matrix} {u_{d} = {{R_{s}i_{d}} - {\omega_{r}\left( {{l_{{qd}_{10}}i_{q}} + {l_{{qd}_{11}}i_{q}i_{d}} + {l_{{qd}_{30}}i_{q}^{3}} + {l_{{qd}_{12}}i_{q}i_{d}^{2}}} \right)} + {\left( {l_{{dq}_{10}} + {2l_{{dq}_{20}}i_{d}} + {l_{{dq}_{12}}i_{q}^{2}} + {3l_{{dq}_{30}}i_{d}^{2}}} \right)\frac{{di}_{d}}{dt}} + {\left( {{2l_{{dq}_{02}}i_{q}} + {2l_{{dq}_{12}}i_{q}i_{d}}} \right)\frac{{di}_{q}}{dt}}}} & (13) \\ {u_{q} = {{R_{s}i_{q}} + {w_{r}\psi_{m}} + {\omega_{r}\left( {{l_{{dq}_{10}}i_{d}} + {l_{{dq}_{02}}i_{q}^{2}} + {l_{{dq}_{20}}i_{d}^{2}} + {l_{{dq}_{12}}i_{d}i_{q}^{2}} + {l_{{dq}_{30}}i_{d}^{3}}} \right)} + {\omega_{r}\left( {\psi_{m} + {l_{{dq}_{02}}i_{q}^{2}}} \right)} + {\left( {{l_{{dq}_{11}}i_{q}} + {2l_{{qd}_{12}}i_{q}i_{d}}} \right)\frac{{di}_{d}}{dt}} + {\left( {l_{{dq}_{10}} + {l_{{dq}_{11}}i_{d}} + {3l_{{qd}_{30}}i_{q}^{2}} + {l_{{dq}_{12}}i_{d}^{2}}} \right)\frac{{di}_{q}}{dt}}}} & (14) \end{matrix}$

Several scenarios can be possible. If all the flux-linkage coefficients or parameters (represented by the letter l) are determined in a previously performed offline procedure or are somehow known, the only unknown parameters would be R_(s) and ψ_(m). In this case, the two dq-voltage equations are enough to find the two unknown parameters, the coefficient matrix would be of full rank, meaning that there is a unique solution for the problem. Therefore, with the measurements of one operational point is possible to make a valid estimation of R_(s) and ψ_(m).

Each operational point delivers a d-axis and a q-axis voltage with its corresponding dq-axis currents and angular velocity. If there are 4 unknown parameters, it would be necessary to obtain two sets of different operational points to form a system of 4 equations with 4 unknown parameters.

Once an initial set of operational values have been obtained to minimise the objective function, further operational values can be used in place of the oldest in subsequent iterations of the characterisation. The only requirement is that the number of unique operational values used within computation of the objective function is at least as high as the number of parameters that are being identified.

The applicant has appreciated that the collection of sufficient operational values when the motor is online may take a relatively long time, during which the temperature of parts of the motor may have varied.

Therefore, in a refinement the method may comprise applying a thermal model of the motor to the operational measurements when fitting to the motor model to at least partially account for the temperature of parts of the motor. Two parameters of the model showing greater sensitivity to temperature are the winding resistance and flux produced by any permanent magnets present in the motor. It is known that the resistivity of copper from which many motor windings are made varies with temperature. Similarly for magnets manufactured from neodymium iron and boron (NdFeB) their remanent flux density is known to reduce at a rate of approximately 0.11% per degree Celcius. Taking just these two variations with temperature, the online equations for a model according to the present invention of order 3 become:

$\begin{matrix} {u_{d} = {{{{tempco}_{copper}\left( {T_{winding} - T_{0}} \right)}R_{s}i_{d}} - {\omega_{r}\left( {{l_{{qd}_{10}}i_{q}} + {l_{{qd}_{11}}i_{q}i_{d}} + {l_{{qd}_{30}}i_{q}^{3}} + {l_{{qd}_{12}}i_{q}i_{d}^{2}}} \right)} + {\left( {l_{{dq}_{10}} + {2l_{{dq}_{20}}i_{d}} + {l_{{dq}_{12}}i_{q}^{2}} + {3l_{{dq}_{30}}i_{d}^{2}}} \right)\frac{{di}_{d}}{dt}} + {\left( {{2l_{{dq}_{02}}i_{q}} + {2l_{{dq}_{12}}i_{q}i_{d}}} \right)\frac{{di}_{q}}{dt}}}} & (15) \\ {u_{q} = {{{{tempco}_{copper}\left( {T_{winding} - T_{0}} \right)}R_{s}i_{q}} + {{{tempco}_{magnet}\left( {T_{magnet} - T_{0}} \right)}\psi_{m}\omega_{r}} + {\omega_{r}\left( {{l_{{dq}_{10}}i_{d}} + {l_{{dq}_{02}}i_{q}^{2}} + {l_{{dq}_{20}}i_{d}^{2}} + {l_{{dq}_{12}}i_{d}i_{q}^{2}} + {l_{{dq}_{30}}i_{d}^{3}}} \right)} + {\omega_{r}\left( {\psi_{m} + {l_{{dq}_{02}}i_{q}^{2}}} \right)} + {\left( {{l_{{qd}_{11}}i_{q}} + {2l_{{qd}_{12}}i_{q}i_{d}}} \right)\frac{{di}_{d}}{dt}} + {\left( {l_{{qd}_{10}} + {l_{{qd}_{11}}i_{d}} + {3l_{{qd}_{30}}i_{q}^{2}} + {l_{{qd}_{12}}i_{d}^{2}}} \right)\frac{{di}_{q}}{dt}}}} & (16) \end{matrix}$

Through reviewing the above equations, it can be seen that there are now additional parameters, Tmagnet and Twinding for the magnet and winding temperatures respectively to be identified as part of the optimization. T_(o) is a known constant reference temperature and tempco_(copper) and tempco_(magnet) are temperature coefficients of copper and magnet material.

The permeability of electrical steels used within motors is also known to vary with mechanical stress such as may result from thermal expansion at different rates of dissimilar materials used within a motor. A variation in the permeability of the electrical steel carrying magnetic flux linking with the windings may be observable through a variation in the inductance parameters of the characterised model.

In this fully online method, the data is gathered over time as the motor runs rather than gathering quickly offline using ramps, or by simulation.

In operational situations where less than maximum torque is demanded from the method may comprise adjusting the input current, for example to put more current on the d-axis without producing more torque. This optional method feature would enable more unique operational values to be obtained without impacting the operation of the motor and would widen the operating range over which the motor is accurately characterized.

The applicant further proposes that a mixed offline and online method of characterisation may be used. By online we mean characterising the motor when it is in use. In the case of an electric power steering system, for example, where the motor is used to apply an assistance torque to a part of a steering mechanism to help the driver turn the wheel, online means characterising the motor when it is being used to provide the assistance. Typically this will permit characterisation at any time that the vehicle ignition is switched on and the steering system is live.

In this mixed method the steps may therefore comprise:

Performing steps of the first aspect initially with the motor offline or predicted using simulation from which the parameters of the model are estimated, and during a later online operation of the motor performing the following steps:

Measuring a plurality of sets of operational values of the motor, each set corresponding to a different phase advance angle or phase current,

Transforming the measured values into the rotor dq reference frame

optionally measuring the temperature of the windings or magnets and

Fitting the model coefficients to the measured operational values, whereby the step of fitting the model is constrained using one or more of the parameters, but less than all of the parameters, obtained during the offline measurements.

In a most preferred implementation of the method online the measured operational values may comprise the phase voltages, phase currents and rotor position. These are sufficient to enable the fitting of the model to the measured values to be carried out, with the rotor position enabling the currents and voltages to be transformed into the dq frame of reference as required.

Most advantageously, the steps carried out online for the optimisation of the parameters of the model is constrained using predetermined values for the parameters which are known to be relatively independent of temperature.

This allows those parameters that vary relatively a lot with temperature such as motor winding resistance and magnetic flux to be determined online and those which do not such as cross coupling between d-axis and q-axis fluxes and inductance to be determined offline.

Reducing the number of parameters that are determined from the online measurements reduces the amount of computing power needed and may also reduce the time taken to generate usefully accurate values for those online parameters compared with a fully online method. Conversely, compared with a fully offline method the modelling can be more accurate as the effects of temperature can be included in the modelling.

In a further refinement, the method may determine the temperature of parts of the motor such as the magnets and coil windings by inferring the temperature from the variation identified in the motor resistance and magnet flux over time.

The reader will appreciate that the online method can be implemented where the temperature invariant parameters of cross coupling and inductance are obtained by some other means than the method of claim 1, with these parameters being used with the operational values obtained online to optimise the remaining parameters of the model.

According to a second aspect the invention provides a motor circuit including a permanent magnet electric motor having a plurality of phase windings, particularly of an electric power steering system, the motor circuit comprising:

-   -   a control stage arranged to generate a current demand signal in         response to a torque demanded of the motor, and     -   A drive stage comprising an inverter having a plurality of drive         stage switches and a driver which generates drive signals for         the switches of the inverter in response to the current demand         signal, the drive signals determining the magnitude and phase of         the current in each phase of the motor, and     -   Means for determining one or more operational values from the         motor,     -   Processing means configured to fit a flux linkage model to the         measured operational values to determine one or more parameter         of the motor defined by the model, and     -   Modifying means that in use modifies one or more of the         magnitude and the phase of the current demanded for each phase         of the motor by the controller to modify the     -   performance of the motor as a function of the one or more         parameters.

The processing means may modify the magnitude and phase through setting of the current demand signal value or modifying a nominal current demand signal to take account the condition of the motor as indicated by the one or more parameters obtained from the motor.

The means for determining the one or more operational values may comprise one or more sensors that measure one or more of the operational values.

The means may determine the phase voltage and phase currents and the rotor position of the motor when the motor is in use and may comprise one or more sensors enabling these operational value to be measured. Alternatively, a form of sensorless control may be used to estimate the operational values. For example, the skilled person will be familiar with methods of estimating th rotor position based on observations of the motor currents.

BRIEF DESCRIPTION OF THE DRAWINGS

There will now be described, by way of example only, one embodiment of the present invention with reference to and as illustrated in the accompanying drawings of which:

FIG. 1 is a block diagram showing the main elements of a motor circuit which uses closed loop control;

FIG. 2 is an overview of the key components of an electric power steering system that may include a motor which uses closed loop control;

FIG. 3 is a simplified circuit diagram of a three phase motor and a drive stage inverter which applies terminal voltages to the phases of the motor;

FIG. 4 is flow chart showing the top level steps of an exemplary method in accordance with the present invention;

FIG. 5 is block diagram of the key steps that are carried out online to determine parameters of the motor from an flux linkage model of the motor;

FIG. 6 is an alternative representation of the steps of FIG. 5 showing the operational values fed into the method and the output parameters obtained from the flux linkage model;

FIG. 7 is a representation of a thermal model of the motor circuit which may be used alongside the flux linkage model; and

FIG. 8 is an illustration of a motor control circuit within the scope of an aspect of the invention in which the feedback control generates a torque error signal based on a torque value obtained from fitting of a flux linkage model to operational values obtained during use of the motor.

DESCRIPTION

Referring to FIG. 2, a steering system 10 comprises a steering shaft 11 connected at one end to a steering wheel (not shown) and at the other to a steering rack (also not shown) that is in turn connected to the road wheels (not shown) of the vehicle. As the driver turns the steering wheel the steering shaft 11 rotates which in turn moves the rack. Power assistance is provided by means of an electric motor 12 which is connected to either the steering shaft 11 or the rack through an output shaft 13 that engages a gearbox 14.

It is within the scope of the present invention that the motor may form a part of a steering system where may be no mechanical connection from the steering wheel to the road wheels, a so called steer-by-wire electric steering system, the motor providing the sole means for turning the steering rack or working along with a secondary source of power for turning the steering rack such as a second motor or hydraulic circuit. A position sensor for measuring the angular position of the steering wheel would of course then be needed. It is also within the scope of this invention for the motor to be used in a system that is not a steering system and so this example should not be considered limiting to the scope of the invention.

Referring to FIG. 3, the motor 12 is a three phase motor and more specifically, may comprise an electrically commutated sinusoidal AC brushless permanent magnet synchronous motor which comprises a rotor having, for example, six magnets mounted on it arranged so as to provide six poles which alternate between north and south around the rotor. The rotor therefore defines three direct or d axes evenly spaced around the rotor and three quadrature or q axes interspaced between the d axes. The d axes are aligned with the magnetic poles of the magnets where the lines of magnetic flux from the rotor are in the radial direction, and the q axes are spaced between the d axes where the lines of magnetic flux from the rotor are in the tangential direction. As the rotor rotates, the directions of the d and q axes clearly rotate with it.

The motor stator may comprise, for example, a nine slot copper wound element having three groups of three teeth, each group of teeth having a common winding forming a respective one of the three phases. There are therefore three electrical cycles in each full rotation of the rotor, and the three teeth in any phase are always in the same electrical position as each other.

The three motor windings, generally designated as phases A, B and C in FIG. 3, are connected in a star network. In other embodiments, other arrangements, such as delta networks, can be used. The phase windings are coiled around the stator teeth. One end of each coil is connected to a respective terminal of an inverter bridge. The other ends, of the coils are connected together to form the star centre.

The motor 12 forms a part of a motor circuit 20 as shown in FIG. 8. The motor 12 is driven by an inverter 15 shown in FIG. 3 which defines a motor drive stage. The inverter 15 of the exemplary embodiment comprises a three-phase inverter bridge with one phase for each motor phase. A DC voltage is applied by a battery between a supply rail and a ground rail. The inverter comprises three parallel arms (A, B, C), each of which has a pair of transistors connected in series between a supply rail and a ground rail. The terminals connecting the motor phases A, B, C to the bridge are located between each pair of FETs.

The gate of each FET is connected to a gate driver of a drive stage to switch each FET ON or OFF. Each gate driver receives control signals from a control stage. More specifically and referring to FIG. 8 of the drawings the motor is controlled by a closed loop motor current control system according to an embodiment of the invention, which comprises a current sensing system, a position sensing system, a drive stage and a current controller. It may optionally include a torque sensor 16 as shown in FIG. 2.

The current sensing system may comprise a resistor R in the ground line between the motor and ground which enables measurements to be made of the total current flowing though all of the windings. In order to measure the current in each of the windings the total current has to be sampled at precise instants within the PWM period where the voltage applied to each terminal of the winding (and hence the conduction state of a particular phase) is known. As is well known, in order for the currents in each of the windings to be measured in any one PWM period, the drive circuit needs to be in each of at least two different active states for a predetermined minimum time.

The current sensing system measures the currents i_(A), i_(B), i_(C) in the three phases of the motor, which comprise stationary windings, and outputs a signal indicative of the current vector in the stationary coordinates having α and β components. These measurements are then processed within a current controller 16, or control stage, where a signal processing executes a coordinate transformation block arranged to convert the current vector from the α and β components in the stationary reference frame, to D and Q components i_(D) and i_(Q) defining the current vector in the rotor reference frame, which rotates relative to the fixed windings, with the Q axis current being the torque generating component and the D axis current being non-torque generating.

A comparator (not shown) that forms part of the current controller in this example, receives the measured D and Q currents from the current sensing system and compares them with demanded D and Q current components to generate a current error. These demanded components form a current demand signal. Although this is expressed in the rotor reference frame the skilled person will understand that this may be transformed to the stationary reference frame and as such the current demand signal is indicative of the individual phase currents that are required at any given time.

The current controller 17, or current control stage, therefore receives the current error and outputs a demanded voltage vector, in the form of a D and Q axis voltage demand V_(DQ) calculated to reduce the current error so that the measured current vector I_(DQ) approaches the demanded current vector i_(DQ)*. A further transformation block receives the voltage demand from the current controller 17 and converts it to α and β components V_(αβ) which are input to the drive stage inverter 15 which controls the switches to apply voltages to the phase windings of the motor in a PWM pattern which produces the net voltage in the windings having a magnitude and direction corresponding to the voltage demand vector.

The current request received by the current controller is typically a function of a torque demand signal indicative of the level of assistance torque to be applied by the motor. A torque sensor 16 may be provided which measures the torque carried by the steering shaft. This torque demand signal may be generated by a torque controller which receives as an input the torque signal from the torque sensor measuring the torque applied at the steering wheel. The torque controller will typically use the torque signal to look up a torque demand signal using a look up table or boost curve stored in a memory of the system.

In use, the drive stage inverter 15 applies voltage signals to the gate of each FET to switch them ON and OFF rapidly in a predefined sequence, thus controlling the voltage applied to each phase of the motor and current flowing through the windings. This in turn controls the strength and orientation of the magnetic field produced by the windings, and hence the torque and speed of the motor. By using a sufficiently rapid pulse width modulation (PWM) switching pattern, a phase drive waveform can be applied that approximates the ideal sinusoidal waveform required to rotate the motor smoothly.

Using the motor circuit 20 described above, a number of alternative methods may be implemented during use of the motor for modifying the performance of the motor. Each method is built around fitting a novel flux linkage model to operational value of the motor obtained when it is in use, by measuring or estimating, thereby to determine various parameters of the motor. The performance of the motor is modified depending on the value of one or more of these parameters, for example by setting one or more of the magnitude and the phase of the current demanded for each phase of the motor by the controller to thereby modify the performance of the motor. An exemplary method of determining these parameters by fitting the model to the operational values at the end of this description.

The key steps of each method are shown in the flow diagram of FIG. 4. In summary, a torque demand signal is received (step 100), and from this a current demand signal is generated (step 110) based on knowledge of the motor parameters. As the motor is running, and in use, various operational values of the motor including the rotor position, phase currents and phase voltages, are measured or otherwise obtained (step 120) and these are then fitted to a flux linkage model (step 130). The output of this fitting is a set of parameters of the motor defined by the model. Based on these parameters the controller modifies the current demand signal or otherwise modifies the output of the current controller that is fed to the drive stage (step 140) so as to modify the operation of the motor.

Exemplary Method 1—Adaptive Phase Advance

In this method the electromagnetic torque produced by the motor is maximised at the commanded operating speed subject to operating constraints. These constraints may include the maximum phase current and available supply voltage.

Typically the phase advance applicable at any speed is determined in a laboratory and programmed in to the current controller. This might be done at only one temperature. In the method of the invention, this phase advance may be varied in use of the motor as the current demands are modified dependent on the value of the parameters obtained using the model.

Through computing the optimal phase advance online using the model, rather than using fixed predetermined phase advance values, the capability of the motor under the actual operating conditions can be maximised. Alternatively costly and lengthy procedures to identify the optimal phase advance at a range of operating temperatures can be avoided.

The process of optimizing the dq-currents requested by the current controller 20 to meet a given torque demand may comprise the minimization of the sum of the squared errors for the given torque by using equation (10), with the consideration of the given constraints as maximum phase current and maximum phase voltage in the form of equations i _(d) ² +i _(q) ² ≤i _(phase_max) ²  (17) u _(d) ² +u _(q) ² ≤u _(o_max) ²  (18)

As equations (10) and (16) are a function of the magnet permanent flux linkage ψ_(m), the magnet temperature will affect the optimal dq-currents. In a similar way, the winding resistance is part of equations (15) and (16) affecting the dq-voltages and contributing to the voltage constraint. For accurate dq-current optimization the winding temperature may be involved as well.

Exemplary Method 2=Torque Estimation

In the example, the method fits the values to a flux linkage model that includes terms representing the variation in permanent magnet flux linkage with the magnet temperature. By calculating the electromagnetic torque to be given the d- and q-axis flux linkages and d- and q-axis currents supplied to the motor during use of the motor. Through utilising a flux linkage model that includes the magnet flux variation, magnetic saturation and cross-coupling effects between the d- and q-axes an accurate online estimate of the motor torque can be obtained.

The method may comprise comparing the estimated torque with the demanded torque indicated by the torque demand signal to derive an error term indicative of the difference in the torques and input the error term to the controller. The controller may generate a current demand signal from the error term.

Exemplary Method 3 and Method 4=Magnet or Rotor Winding Temperature Estimation

In these exemplary methods the parameters obtained using the flux linkage model are processed to determine the temperature of either the magnets of the motor or the windings of the motor.

Exemplary Method 5—Thermal Model Improvement

In an alternative example the flux linkage model may be combined with a thermal model to improve accuracy. A suitable thermal model 30 is shown in FIG. 7.

Exemplary Method 6—Winding Resistance Estimation

In this example the method determines the winding resistance from use of the model and comprises comparing the winding resistance determined during use of the motor with a predefined nominal winding resistance to perform phase resistance diagnostics where any major or unexpected change in the winding resistance would be observed by monitoring the estimated value of the stator winding resistance or interconnects between the motor and the control electronics.

All of methods 1 to 6 may be combined.

Each of the example methods described above use a flux linkage model that includes the effects of saturation for the fitting of the values. In particular, the exemplary methods use a flux linkage model that includes the effects of cross-coupling between d- and q-axes instead of, or in addition to, the effects of saturation. Prior art models are generally linear models that do not allow for these effects, making them unsuitable for applications were accurate determination of the parameters is required.

In a particularly advantageous arrangement the flux linkage model utilises a power series based upon Taylor's theorem for multivariable functions. This enables the power series to be valid for all infinite differentiable functions.

Exemplary Method for Online Motor Parameter Determination

A method of obtaining the parameters online from the model is illustrated in FIGS. 5 and 6. In this online method, a set of base or nominal values for one or more of the parameters are first obtained using an offline method. In other arrangements all of the parameters may be determined from the model.

Where nominal values for the parameters are obtained, those parameters which are thermally insensitive such as the cross coupling between d-axis flux and q-axis flux are retained and those which are temperature dependent are discarded. The method will then identify temperature dependent parameters during use of the motor.

Parameter values identified offline may be used to constrain parameter values identified online to realistic values. For example if the phase resistance of a copper winding is known to be 10 mOhm at room temperature, then allowing for a spread of production tolerances and considering the environmental conditions the motor is deployed within and anticipating some self-heating within the winding, allows constraints to be placed upon the online optimization. Conversely, if no, or a very wide range of values are allowed, a value outside of the anticipated normal range could be used to detect an abnormality has occurred within the motor, controller or data acquisition.

During the use of the motor, measurements of motor operational values are then obtained including the motor phase voltage and motor phase currents and the motor rotor position. The later allows the voltages and currents to be transformed into the rotor reference frame. The motor torque does not need to be measured in this online part of the method, although if available the accuracy of the motor parameters obtained can be improved. A further check of the validity of the motor parameter provided by the model is available by calculating the torque produced by the motor using the model parameters, and comparing it to the range of credible values the system is designed for.

Through tracking the variation of model parameters with time during model operation, further checks can be made upon the validity of the identified model parameters. For example, if the magnet flux identified by the procedure suddenly doubled within a few milliseconds when the thermal time constant of the motor is several orders of magnitudes longer, it would call in to question the validity of the parameter values or the operating state of the motor and controller.

Through comparing the temperature dependent parameter values identified online, with those identified offline for the same motor allows the temperature change to be identified. To do this required knowledge of the temperature coefficient relating the material property to temperature. For example the electrical resistivity of a winding.

Within a volume production run of many nominally identical motors there will be mechanical and material tolerances. Identified model parameters found on online will therefore likely differ from model parameters obtained from a pre-production laboratory sample at the same temperature and motor operating point. Provided the parameter values identified online are within the anticipated range for the motor operating temperature their numerical absolute values may not be so useful as the parameter variation over time. For example if two sets of measurements are taken 10 seconds apart in an online system, and the model parameters are identified after each measurement, and the winding resistance is found to have increased by 20% and the magnet flux reduced by 4% from the following equations the temperature of the winding can be deduced to have risen by approximately 50 degrees Celcius, and the magnet temperature to have risen by approximately 36 degrees Celcius.

$\begin{matrix} {\frac{R_{s_{t = {10s}}}}{R_{s_{t = {0s}}}} = {1 + {\left( {T_{winding} - 20} \right)\frac{0.393`}{100}}}} & (19) \\ {\frac{\psi_{m_{t = {10s}}}}{\psi_{m_{t = {0s}}}} = {1 + {\left( {T_{magnet} - 20} \right)\frac{0.110}{100}}}} & (20) \end{matrix}$

Where in the above equations T_(winding) is the winding temperature in degrees Celcius and T_(magnet) is the magnet temperature in Degrees Celcius and the winding is substantially made from copper and the magnet substantially from an alloy of Neodymium iron and boron.

Batches of measurements of operational values are obtained containing at least the number of unique sample points corresponding to the number of unknown parameters of the model. For example if only Rs, magnet flux and temperature are unknown, then a minimum of 3 measurement samples are needed. More samples will help improve the accuracy of the model but will take longer to compute. The skilled person will appreciate the need to balance accuracy of an individual iteration of the model parameter calculation with the resources available to sample the necessary signals and the time available within a task scheduler in an online system to perform the computations. The retained parameters are used as constraints to the model so only the temperature dependent, and parameters need to be determined. Of course, in other arrangements all parameters may be determined online.

Depending on how the measurements are collected, it may be some time before enough measurements are available for an update of the parameters to be made. In this time, the temperature of the motor parts may have varied, which will affect the accuracy of the modelling. To ameliorate this, the method may include use of a motor thermal model. Such a lumped parameter thermal model is illustrated in FIG. 7. Other models produced by statistical approaches such as through ‘design of experiments’ or by computer calculation using finite element analysis could be used. Within the thermal model of FIG. 7 the power loss within the motor windings is calculated based upon measured values used within the current controller of the ‘control’ block in FIG. 18. Many readers will be familiar with thermal equivalent circuits where thermal resistance and thermal capacitance are analogues of resistance and capacitance in an electrical circuit. Similarly power loss within a winding in a thermal equivalent circuit is the analogue of current in an electrical circuit, and temperature difference the analogue of potential difference in an electrical circuit. Thermal equivalent circuits are solved using the same methods and equations as electrical equivalent circuits. The thermal equivalent circuit of FIG. 7 is highly simplified and only contains a few components for the purposes of illustration. By studying the thermal circuit the reader will appreciate that heat generated within the windings through the resistive losses (calculated according to the square of the instantaneous current multiplied by the electrical resistance) is predominantly passing through the thermal resistance to the stator material, then through the housing material to either the ambient or mounting face of the motor. A parallel thermal path also exists from the housing through the bearing, and in to the rotor to the magnets. Those skilled in the art will appreciate that more complicated, higher fidelity thermal equivalent circuits including effects of convection, radiation, and forced cooling are well known and utilised.

In use the thermal model calculates the electrical losses and then solves for the temperatures at points within the thermal equivalent circuit. Ideally at least one of the temperatures calculated within the equivalent circuit is known. For example by means of a thermistor monitoring the temperature of the air around the motor. The difference between the known measured temperatures and those estimated in the model can then be included in the least squares objective function i.e. equation?? alongside the temperature dependent motor parameters such as stator winding resistance and magnet flux.

In cases where a direct measurement of temperature is unavailable, the thermal model is used to obtain a prediction of how much the temperatures should have changed by since there was enough measurement data available to compute the temperature dependent parameters. This allows additional constraints to be applied to the optimization of the temperature dependent motor parameters. It is likely that assumptions about the environmental temperature surrounding the motor will need to be made in these instances. Similarly some of the thermal resistances within a typical thermal equivalent circuit will likely vary non-linearly with temperature. Consequently a suitable tolerance for errors within the thermal model will need to be applied so the constraints applied to the motor parameter optimization. Such tolerance limits could be obtained through a series of offline tests upon the motor when validating the motor thermal model against measured temperatures in both stalled and rotating conditions at various ambient temperatures with the motor operating in an environmental chamber.

By fixing a sub-set of motor parameters during the offline stage of the method, the temperature change can be inferred from the variation identified in the motor resistance and magnet flux. This will allow the temperature of the windings and magnet or other parts of the motor to be measured accurately without additional sensors. 

The invention claimed is:
 1. A method of controlling a motor of an electric power steering system, comprising the steps of: receiving a motor torque demand signal indicative of a torque required from the motor; generating from the motor torque demand signal a current demand signal indicative of the currents to be applied to each phase to meet the torque required; determining one or more operational values from the motor; setting the current demand signal as a function of one or more parameters of the motor obtained by fitting a flux linkage model to the measured operational values; and maximizing an electromagnetic torque produced by the motor to modify a performance of the motor at a commanded operating speed subject to operating constraints, the operating constraints including a maximum phase current and an available supply voltage.
 2. A method according to claim 1, further comprising determining from use of the flux linkage model a maximum torque per ampere below a based speed and a maximum torque per volt above the base speed.
 3. A method according to claim 1, further comprising determining from the flux linkage model a winding temperature or rise or fall in temperature of windings of the motor.
 4. A method according to claim 1, further comprising combining the flux linkage model with a thermal model of the motor.
 5. A method according to claim 1, further comprising determining a winding resistance from use of the flux linkage model and comparing the winding resistance determined during use of the motor from the flux linkage model with a predefined nominal winding resistance to perform phase resistance diagnostics where any major or unexpected change in the winding resistance would be observed by monitoring an estimated value of a stator winding resistance or interconnects between the motor and control electronics.
 6. A method according to claim 1, wherein a thermal model is used together with the flux linkage model.
 7. A method according to claim 6, further comprising measuring a temperature using a temperature sensor and inputting the measured temperature to the thermal model.
 8. A method according to claim 1, wherein the flux linkage model utilises a power series based upon Taylor's theorem for multivariable functions.
 9. A method of controlling a motor of an electric power steering system, comprising the steps of: receiving a motor torque demand signal indicative of a torque required from the motor; generating from the motor torque demand signal a current demand signal indicative of the currents to be applied to each phase to meet the torque required; determining one or more operational values from the motor; setting the current demand signal as a function of one or more parameters of the motor obtained by fitting a flux linkage model to the measured operational values; and fitting the operational values to the flux linkage model that includes terms representing a variation in a permanent magnet flux linkage with a magnet temperature.
 10. A method according to claim 9, further comprising calculating an electromagnetic torque given d- and q-axis flux linkages and d- and q-axis currents supplied to the motor during use of the motor utilizing the flux linkage model that includes a magnet flux variation, a magnetic saturation and cross-coupling effects between the d- and q-axes.
 11. A method according to claim 10, further comprising: comparing an estimated torque with a demanded torque indicated by the motor torque demand signal to derive an error term indicative of a difference in the torques; and inputting the error term to a controller.
 12. A method according to claim 10, further comprising using a computed torque value for monitoring and diagnostic functions to evaluate a health of the motor.
 13. A method of controlling a motor of an electric power steering system, comprising the steps of: receiving a motor torque demand signal indicative of a torque required from the motor; generating from the motor torque demand signal a current demand signal indicative of the currents to be applied to each phase to meet the torque required; determining one or more operational values from the motor; setting the current demand signal as a function of one or more parameters of the motor obtained by fitting a flux linkage model to the measured operational values; and using the flux linkage model to identify an operating temperature of permanent magnets within the motor during use of the motor or when the motor is offline.
 14. A method according to claim 13, further comprising: predetermining one or more parameters of the motor prior to use of the motor that are relatively insensitive to temperature and at a later time during use of the motor measuring the operational values of the motor and from those establish those same parameters of the motor from the flux linkage model; and comparing offline and online values of those parameters to identify how much a magnet flux has varied.
 15. A method according to claim 13, further comprising actively de-rating the motor as a function of the identified operational temperature.
 16. A motor circuit including a permanent magnet electric motor having a plurality of phase windings, particularly of an electric power steering system, the motor circuit comprising: a control stage arranged to generate a current demand signal in response to a torque demanded of the permanent magnetic electric motor; and a drive stage comprising an inverter having a plurality of drive stage switches and a driver which generates drive signals for the switches of the inverter in response to the current demand signal, the drive signals determining a magnitude and phase of a current in each phase of the permanent magnetic electric motor; means for determining one or more operational values from the permanent magnetic electric motor; processing means configured to fit a flux linkage model to the determined operational values to determine one or more parameters of the permanent magnetic electric motor defined by the flux linkage model; and modifying means that in use modifies one or more of the magnitude and the phase of the current demanded for each phase of the permanent magnetic electric motor by a controller to modify a performance of the motor as a function of the one or more parameters.
 17. A motor circuit according to claim 16, wherein the means for determining the one or more operational values comprises one or more sensors that measure one or more of the operational values.
 18. A motor circuit according to claim 16, wherein the determining means determines a phase voltage and phase currents and a rotor position of the permanent magnetic electric motor when the permanent magnetic electric motor is in use and comprises one or more sensors enabling the one or more operational values to be measured. 